convert mysql data to json data using php